from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    api_host: str = "0.0.0.0"
    api_port: int = 8000
    env: str = "dev"

    class Config:
        env_file = ".env"
        extra = "ignore"     # 关键：允许 .env 里有多余字段

settings = Settings()
